shut up (someone) in a room

Translations
запереть (кого-то) в комнате
They shut up the dog in a room while the guests were over.
Они заперли собаку в комнате, пока были гости.